MAIN_OBJ	= compress_cpu.o compressTitle_cpu.o compressOutput_cpu.o main.o
CUDA_HOME       = /home/yuwei/NVIDIA_GPU_Computing_SDK
NVCC_HOME	= /usr/local/cuda
CC              = g++
NVCC            = nvcc 
INCLUDE         = -I./cpp -I$(NVCC_HOME)/include -I$(CUDA_HOME)/C/common/inc 
LIB             = -L/usr/local/lib -L$(NVCC_HOME)/lib64 -L$(CUDA_HOME)/C/lib -lcutil_x86_64 -lcuda -lcudart -lpthread
CFLAGS          = -O3
NVCCFLAGS       = -O3 -arch=sm_20 --ptxas-options=-v


outputCompresser: $(MAIN_OBJ)
	$(CC) -o outputCompresser $(MAIN_OBJ) $(CFLAGS) $(INCLUDE) $(LIB)
compress_cpu.o: ./cpp/compress_cpu.cpp
	$(CC) -c ./cpp/compress_cpu.cpp $(CFLAGS) $(INCLUDE)
compressTitle_cpu.o: ./cpp/compressTitle_cpu.cpp
	$(CC) -c ./cpp/compressTitle_cpu.cpp $(CFLAGS) $(INCLUDE)
compressOutput_cpu.o: ./cpp/compressOutput_cpu.cpp
	$(CC) -c ./cpp/compressOutput_cpu.cpp $(CFLAGS) $(INCLUDE)
main.o: ./cpp/main.cpp
	$(CC) -c ./cpp/main.cpp $(CFLAGS) $(INCLUDE)
all: outputCompresser

clean:
	rm -f *.o outputCompresser builder
